package com.ssh.demo.main.common.bean;

import javax.persistence.Entity;

@Entity
public class AdminId implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private short id;
	private String user;

	public AdminId() {
	}

	public AdminId(short id, String user) {
		this.id = id;
		this.user = user;
	}

	public short getId() {
		return this.id;
	}

	public void setId(short id) {
		this.id = id;
	}

	public String getUser() {
		return this.user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof AdminId))
			return false;
		AdminId castOther = (AdminId) other;

		return (this.getId() == castOther.getId())
				&& ((this.getUser() == castOther.getUser()) || (this.getUser() != null && castOther.getUser() != null
						&& this.getUser().equals(castOther.getUser())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + this.getId();
		result = 37 * result + (getUser() == null ? 0 : this.getUser().hashCode());
		return result;
	}

}
